package dylan.id.final1;
import android.app.Activity;
import android.content.Context;
import android.content.Intent;
import android.os.Bundle;
import android.view.View;
import android.view.View.OnClickListener;
import android.widget.Button;
import android.widget.EditText;
import android.widget.TextView;
public class Activity2 extends Activity {
	@Override
	public void onCreate(Bundle savedInstanceState) {
		super.onCreate(savedInstanceState);
		setContentView(R.layout.voice_recog);
		TextView info = (TextView)findViewById(R.id.textView1);
		info.setText("Type in the number of turns you want to play to and press the start button!");
		Button launch = (Button)findViewById(R.id.button1);
		final Context ctx = this;
		final EditText msgSender = (EditText)findViewById(R.id.editText1);
		final Intent intent = new Intent(ctx, FinalActivity.class);
		launch.setOnClickListener(new OnClickListener(){
			public void onClick(View v) {
				String msgQueue = msgSender.getText().toString();
				intent.putExtra("text", msgQueue);
				ctx.startActivity(intent);
			}
		});
	}
}
